from sys import *
set_int_max_str_digits(10010)
n = int(input())
x = int(input())
left, right = 0, 1
while right ** n <= x:
    left = right
    right *= 2
while left + 1 < right:
    mid = (left + right) // 2
    p = pow(mid, n)
    if p <= x:
        left = mid
    else:
        right = mid
if left ** n <= x:
    print(left)
else:
    print(right)
